package com.xyz.shiro;

public class ShiroTokenUser {

    public static final ThreadLocal<String> tokenLocal  = new ThreadLocal();

    public static final ThreadLocal userInfoLocal = new ThreadLocal();

    public static void putToken(String tokenInfo){
        tokenLocal.set(tokenInfo);
    }

    public static <T> void putUserInfo(T userInfo){
        userInfoLocal.set(userInfo);
    }

    public static String getToken(){
        return tokenLocal.get();
    }

    public static <T> T getUserInfo(){
        return (T)userInfoLocal.get();
    }

}
